<meta charset="UTF-8">
<script src="https://ss1.bdstatic.com/5eN1bjq8AAUYm2zgoY3K/r/www/cache/static/protocol/https/jquery/jquery-1.10.2.min_65682a2.js"></script>
<div
        id="d1"
        style="width:10px;height:1px;background:red;
position:absolute;bottom:0px;left:1px;transform:rotate(0deg)"></div>
<script>
    $(f);

    //var isDong = false;
    $(document).mousedown(
        function(){
            //isDong = true;
            $("#d1").animate({height:'1000px'},3000,function(){
            });
        }
    );

    $(document).mouseup(
        function(){
            $("#d1").stop();
            $("#d1").css({transform:'rotate(90deg)'});
        }
    );

    function f(){
//        $("#d1").animate({height:'1000px'},3000,function(){
//
//        });


    }
</script>